{* $Id$ *}
{include_core file="admin/lib/header.html" title="核销平台显示"}
<div class="page-header border-bottom clearfix">
  <h2 class="left">核销平台管理<span>更新核销平台</span></h2>
  <a href="{AnUrl('group_platform/admin')}" class="btn btn-default btn-sm right">&lt;&nbsp;返回核销平台列表</a>
</div>
<!--start:核销平台新增-->
<div class="add-form">
  <form action="{AnUrl('group_platform/admin/save')}" method="post" enctype="multipart/form-data">
    <input type="hidden" name="info[id]" value="{$info['id']}">
    <table class="table" cellpadding="0" cellspacing="0">
      <tr>
        <th><label for="" class="add-f-label">核销平台名称：</label></th>
        <td>
          <input name="info[group_platform_name]" style="width:490px;" type="text" class="add-f-ipt1" value="{$info['group_platform_name']}" >
          <div class="tips"><span style="line-height: 34px;color: #f00;margin-right: 10px;">*</span>输入平台名称,长度一般5-15个字符</div>
        </td>
      </tr>
      <tr>
        <th><label for="" class="add-f-label">设置平台排序等级：</label></th>
        <td>
          <input name="info[sort]" style="width:490px;" type="text" class="add-f-ipt1" value="{$info['sort']}" >
          <div class="tips"><span style="line-height: 34px;color: #f00;margin-right: 10px;"></span>只能输入数字,数字越大排序等级越高</div>
        </td>
      </tr>
      <tr>
        <th><label for="" class="add-f-label">平台活动：</label></th>
        <td>
          <input name="info[group_platform_activity]" style="width:490px;" type="text" class="add-f-ipt1" value="{$info['group_platform_activity']}" >
          <div class="tips">输入平台活动</div>
        </td>
      </tr>
      <tr>
        <th><label for="" class="add-f-label">核销平台简介：</label></th>
        <td>
          <input name="info[intro]" style="width:490px;" type="text" class="add-f-ipt1" value="{$info['intro']}" >
          <div class="tips">输入平台简介</div>
        </td>
      </tr>
      <tr>
        <th valign="top"><label class="add-f-label" for="">核销平台内容：</label></th>
        <td>
          <textarea name="info[content]" class="add-f-area">{$info['content']}</textarea>
          <!-- <div class="tips">核销平台内容会显示在相应内容的简介位置，最多输入 <span style="color:red;">80</span> 字，还可输入 <span style="color:red;">200</span> 字</div> -->
        </td>
      </tr>
      <tr>
        <th valign="top"><label class="add-f-label" for="">核销平台图片：</label></th>
        <td class="perUpOuter">
          <div class="clearfix">
            <div class="btn-upload left">
              <a href="javascript:void(0);"><i class="icon-upload"></i>上传封面</a>
              <input type="file" class="js_upFile" name="group_platform_pic">
            </div>
            <!-- <span class="tips left">&nbsp;&nbsp;&nbsp;商家图片比例：540*270</span> -->
          </div>
          <div class="js_upFileBox">
              <div class="js_upFileBox">
              {if $info.group_platform_pic}
              <img src="{_image($info.group_platform_pic, 'list')}" width="270">
              {else}
              <!-- <img src="{$smarty.const.SITE_URL}/images/m/default/focus_default.jpg" width="200"> -->
              {/if}
          </div>
          </div>
        </td>
      </tr>
      <tr>
        <th><label for="" class="add-f-label">是否开通：</label></th>
        <td>
          <label><input type="radio" name="info[is_open]" value="1" {if $info.is_open == 1} checked="checked" {/if}>&nbsp;是</label>
          <label><input type="radio" name="info[is_open]" value="0" {if $info.is_open == 0} checked="checked" {/if}>&nbsp;否</label>
        </td>
      </tr>
      <tr><th>&nbsp;</th><td class="noborder"><button type="submit" class="btn btn-success">&nbsp;&nbsp;&nbsp;确认&nbsp;&nbsp;&nbsp;</button></td></tr>
    </table>
  </form>
</div>
<!--end:核销平台新增-->
<script>
$(function(){    
  // 提交验证
  // 提交验证
  $('form').submit(function(){
    //验证
    if($('input[name="info[group_platform_name]"]').val() == ''){
      showMsg('平台名称不能为空');
      return false;
    }
  });

  // 上传图片预览
  $(".js_upFile").each(function(e){
    $(this).change(function(e){
      handleFileSelect($(this), 270);
    });
  });
  
});

</script>
{include_core file="admin/lib/footer.html"}